<?php
$USE_NEW_FENGKONG = false; 

$conf = array(
	//'配置项'=>'配置值'
    'LOAD_EXT_FILE'         => 'functions',
    'DEFAULT_MODULE'        => 'Home', //默认模块
    'URL_MODEL'             => '2',

    // 开启记录日志
    'LOG_RECORD'            => true,
    'LOG_TYPE'              =>  'File',
    'LOG_LEVEL'             => 'EMERG,ALERT,CRIT,ERR,WARN,DEBUG,SQL',

    //资金端引擎
    "PAYWAY_ENGINE_HOOK" => [
        [
            'class'=> 'Home\Common\Hook\PayWay',
            'params' => [
            ]
        ],
    ],
    //消费分期决策配置
    "DECISION_ENGINE_HOOK" => [
/*
        //年龄
        [
            'class'=> 'Home\Common\Hook\Age',
            'params' => [
//在次范围内则通过
                'min' => 20,  //包含边界
                'max' => 40,  // 包含边界
            ]
        ],
        //民族
        [
            'class'=> 'Home\Common\Hook\Nation',
            'params' => [
                'include' =>["汉"],      //包含在内则通过
                'not_include' =>[""], //包含在内则不通过
                'key' => 'include', //启用include规则或者not_include 规则
            ]
        ],

        //地区
        [
            'class'=> 'Home\Common\Hook\Location',
            'params' => [
		    'has_no_province'=> false,// 不包含省的特殊地区，是否通过 
		    'province_not_include' =>["黑龙江省","青海省"], //包含在内则不通过
		    'city_not_include' =>["驻马店市"], //包含在内则不通过
            ]
        ],

        //手机号码
        [
            'class'=> 'Home\Common\Hook\Phone',
            'params' => [
                'begin_with' =>["170"],      //包含在内则不通过
            ]
        ],

        //芝麻分
        [
            'class'=> 'Home\Common\Hook\SesameScore',
            'params' => [
                'min' =>500,      //小于该值则不通过
            ]
        ],

        //身份证信息
        [
            'class'=> 'Home\Common\Hook\UserInfo',
            'params' => [
		'no_idcard_no_pass' => true,       //true:没有身份证信息，不通过
		'less_than_day_num_no_pass' => 3*30, //不足三个月有效期，则不通过
            ]
        ],

        //通话记录
        [
            'class'=> 'Home\Common\Hook\CallRecord',
            'params' => [
                'min' => 10,
                'call_out_time'=> 600,
                'begin_call_days' => 7
            ]
        ],

        //通讯录
        [
            'class'=> 'Home\Common\Hook\ContactRestrictive',
            'params' => [
                'min' => 40,  //不包含边界
                'badwords_max' => 3,
                'goodwords_min' => 1,
                'repetition_rate' => 0.5,
                'badwords' => ['借贷','代办','办证','套现','催收','分期','假证','要账'],
                'goodwords'=> ['姐','哥','弟','妹','老师','处','局','科','主任','妈','爸','伯','叔','姑','姨','舅','婶','爹','娘','父','母'],
            ]
        ],

//	//hulu检查
//
//        [
//            'class'=> 'Home\Common\Hook\HuluCheck',
//            'params' => [
//		"invalid_idcard_no_pass" =>true, // 身份证号码校验未通过，则不通过
//		"name_not_same_with_opeartor_no_pass" =>true, //姓名与运营商不匹配
//		"idcard_not_same_with_opeartor_no_pass" =>true, //身份证与运营商不匹配
//		"min_bill_num" =>3, //运营商账单不足3个月
//            ]
//        ],
/*
        //本地人
        'LOCAL_PERSON'=> [
            'class' => 'Home\Common\Hook\LocalPerson',
            'params' => ['percent'=>75]
        ],
        
        //宜信阿福
        [
            'class'=> 'Home\Common\Hook\CreditEase',
            'params' => [
                'uid' => 'xxxx',
                'pwd' => 'xxxxxxxxxxx',
                'pem_path' => '/data/webroot/api.9maibei.com/MaiBei/Common/Conf/zc.pem',
                'api_url' => 'http://www.zhichengcredit.com/CreditPortal/api/queryBlackList/V2',
            ]
        ],*/
        //百融
        [
            'class'=> 'Home\Common\Hook\BaiRong',
            'params' => [
            ]
        ],
		
        /*
        //同盾
        [
            'class'=>'Home\Common\Hook\BlackCheck',
            'params' => [
                'partner_code'=>'xxxxxxx',
                'secret_key'=>'xxxxxxxxxxxxxxxxx',
                'secret_key5'=>'xxxxxxxxxxxxxxxxxx',///预筛key/
                'event_id'=>'loan_professional_android', //借款-old/
                'event1_id'=>'register_professional_android', //注册/
                'event2_id'=>'loan_professional_android', //借款/
                'event3_id'=>'trade_professional_android', //交易/
                'event4_id'=>'adjustamount_professional_android', //调额/
                'event5_id'=>'prefilter_professional_web', //预筛/
                'api_url'=>'https://api.tongdun.cn/riskService',
            ]
        ],*/
    ],

    //现金贷决策配置
    "MONEY_DECISION_ENGINE_HOOK" => [
        /*
        //宜信阿福
        [
            'class'=> 'Home\Common\Hook\CreditEase',
            'params' => [
                'uid' => 'xxxxxxxxxx',
                'pwd' => 'xxxxxxxxxxxxxxxxxx',
                'pem_path' => '/data/webroot/api.9maibei.com/MaiBei/Common/Conf/zc.pem',
                'api_url' => 'http://www.zhichengcredit.com/CreditPortal/api/queryBlackList/V2',
            ]
        ],
		*/
		
        //百融
        [
            'class'=> 'Home\Common\Hook\BaiRong',
            'params' => [
            ]
        ],
        
		/*
        //同盾
        [
            'class'=>'Home\Common\Hook\BlackCheck',
            'params' => [
                'partner_code'=>'xxxxxxxxx',
                'secret_key'=>'xxxxxxxxxxxxxxxx',
                'secret_key5'=>'xxxxxxxxxxxxxxxxxxxxxx',//预筛key/
                'event_id'=>'loan_professional_android', //借款-old/
                'event1_id'=>'register_professional_android', //注册/
                'event2_id'=>'loan_professional_android', //借款/
                'event3_id'=>'trade_professional_android', //交易/
                'event4_id'=>'adjustamount_professional_android', //调额/
                'event5_id'=>'prefilter_professional_web', //预筛/
                'api_url'=>'https://api.tongdun.cn/riskService',
            ]
        ],*/
    ],

    'COUNTRY_CITY_LIST'=> require(__DIR__ . '/country.city.list.php'),
    'ALLOW_CITY_LIST'=> require(__DIR__ . '/allow.city.list.php'),
    'CLINET_ID_LIST'=> require(__DIR__ . '/clinet.id.list.php'),
    "WHITE_LIST" => ['413021198312255510','130435199601110910','131182199109023822'],
    "BLACK_LIST" => ['130283199202130666'],
    "DRAW_COUNTY_ID_BLACK_LIST"=> ['630102000000','630103000000','630104000000','630105000000','630121000000','630122000000','630123000000','630202000000','630221000000','630222000000','630223000000','630224000000','630225000000','632221000000','632222000000','632223000000','632224000000','632321000000','632322000000','632323000000','632324000000','632521000000','632522000000','632523000000','632524000000','632525000000','632621000000','632622000000','632623000000','632624000000','632625000000','632626000000','632701000000','632722000000','632723000000','632724000000','632725000000','632726000000','632801000000','632802000000','632821000000','632822000000','632823000000','620102000000','620103000000','620104000000','620105000000','620111000000','620121000000','620122000000','620123000000','620201000000','620302000000','620321000000','620402000000','620403000000','620421000000','620422000000','620423000000','620502000000','620503000000','620521000000','620522000000','620523000000','620524000000','620525000000','620602000000','620621000000','620622000000','620623000000','620702000000','620721000000','620722000000','620723000000','620724000000','620725000000','620802000000','620821000000','620822000000','620823000000','620824000000','620825000000','620826000000','620902000000','620921000000','620922000000','620923000000','620924000000','620981000000','620982000000','621002000000','621021000000','621022000000','621023000000','621024000000','621025000000','621026000000','621027000000','621102000000','621121000000','621122000000','621123000000','621124000000','621125000000','621126000000','621202000000','621221000000','621222000000','621223000000','621224000000','621225000000','621226000000','621227000000','621228000000','622901000000','622921000000','622922000000','622923000000','622924000000','622925000000','622926000000','622927000000','623001000000','623021000000','623022000000','623023000000','623024000000','623025000000','623026000000','623027000000'],
);


$new_fengkong = [
        //年龄
        [
            'class'=> 'Home\Common\Hook\Age',
            'params' => [
//在次范围内则通过
                'min' => 20,  //包含边界
                'max' => 40,  // 包含边界
            ]
        ],
        //民族
        [
            'class'=> 'Home\Common\Hook\Nation',
            'params' => [
                'include' =>["汉"],      //包含在内则通过
                'not_include' =>[""], //包含在内则不通过
                'key' => 'include', //启用include规则或者not_include 规则
            ]
        ],

        //地区
        [
            'class'=> 'Home\Common\Hook\Location',
            'params' => [
		    'has_no_province'=> false,// 不包含省的特殊地区，是否通过 
		    'province_not_include' =>["黑龙江省","青海省","内蒙古","新疆","西藏"], //包含在内则不通过
		    'city_not_include' =>[""], //包含在内则不通过
            ]
        ],

        //手机号码
        [
            'class'=> 'Home\Common\Hook\Phone',
            'params' => [
                'begin_with' =>["170"],      //包含在内则不通过
            ]
        ],

        //芝麻分
        [
            'class'=> 'Home\Common\Hook\SesameScore',
            'params' => [
                'min' =>550,      //小于该值则不通过
            ]
        ],

        //身份证信息
        [
            'class'=> 'Home\Common\Hook\UserInfo',
            'params' => [
		'no_idcard_no_pass' => true,       //true:没有身份证信息，不通过
		'less_than_day_num_no_pass' => 3*30, //不足三个月有效期，则不通过
            ]
        ],

       // //通话记录
       // [
       //     'class'=> 'Home\Common\Hook\CallRecord',
       //     'params' => [
       //         'min' => 10,
       //         'call_out_time'=> 600,
       //         'begin_call_days' => 7
       //     ]
       // ],

       // //通讯录
       // [
       //     'class'=> 'Home\Common\Hook\ContactRestrictive',
       //     'params' => [
       //         'min' => 40,  //不包含边界
       //         'badwords_max' => 3,
       //         'goodwords_min' => 1,
       //         'repetition_rate' => 0.5,
       //         'badwords' => ['借贷','代办','办证','套现','催收','分期','假证','要账'],
       //         'goodwords'=> ['姐','哥','弟','妹','老师','处','局','科','主任','妈','爸','伯','叔','姑','姨','舅','婶','爹','娘','父','母'],
       //     ]
       // ],

	//hulu检查

       // [
       //     'class'=> 'Home\Common\Hook\HuluCheck',
       //     'params' => [
       // 	"invalid_idcard_no_pass" =>true, // 身份证号码校验未通过，则不通过
       // 	"name_not_same_with_opeartor_no_pass" =>true, //姓名与运营商不匹配
       // 	"idcard_not_same_with_opeartor_no_pass" =>true, //身份证与运营商不匹配
       // 	"min_bill_num" =>3, //运营商账单不足3个月
       //     ]
       // ],

];

if($USE_NEW_FENGKONG){
	foreach($new_fengkong as $item){
		$conf["MONEY_DECISION_ENGINE_HOOK"][] = $item;
	}
}

return $conf;
